// index.js
// const app = getApp()
import request from "../../utils/request"
Page({
  data: {
      meetingList:[
      ],
      background_current_img:'',
      logo_src:'',
      event_address:'',
      event_time:'',
      event_name:'',
      event_desc:''
  },
  query(){
       wx.navigateTo({
      url: '/pages/query/query' 
    })
  },
  meet(e){
    console.log(e,"11")
    let index = e.currentTarget.dataset.index
    // 只有当typr为meeting，dinner才会跳转页面，后续可继续添加类型
    if(index.type == "meeting" || index.type == "dinner"){
      wx.navigateTo({
        url: '/pages/convention/convention?param1='+JSON.stringify(index.type)
      })
    }
  },
  async onLoad(options) {
    // 解析路径跳转函数，然后接口拿数据
    let ids = JSON.parse(options.param1)
    const res1 = await request({
      url: "/stractdetail",
      // url: "/dannerdetail",
      data: {
        id: ids
      }
    })
    console.log(res1, "5555551")
    this.setData({
      background_current_img:res1.data.background_current_img,
      logo_src:res1.data.logo_src,
      event_address:res1.data.event_address,
      event_time:res1.data.event_time,
      event_name:res1.data.event_name,
      event_desc:res1.data.event_desc,
      meetingList:res1.data.module_list
    })
  }

});
